﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <title>联系信息</title>
    <!--<link href="../../script/css/bootstrap.css" rel="stylesheet" />
    <link href="../../script/css/bootstrap-theme.css" rel="stylesheet" />
    <link href="../../script/css/select2.css" rel="stylesheet" />
    <link href="../../script/css/bootstrap-datetimepicker.css" rel="stylesheet" />
    <script src="../../script/js/jquery-1.12.3.js"></script>
    <script src="../../script/js/bootstrap.js"></script>
    <script src="../../script/js/select2.full.js"></script>
    <script src="../../script/js/bootstrap-datetimepicker.js"></script>
    <script src="../../script/js/bootstrap-datetimepicker.zh-CN.js"></script>
    <script src="../../script/js/cus-edit.js"></script>-->
</head>
<body>
    <div>
        <form>

                                        <div class='row'>
                                                
                    <div class='col-md-6'>
                        <label>联系人</label>
                        <input class='form-control' name='contact' data-type='text' />
                    </div>
                                                
                    <div class='col-md-6'>
                        <label>联系电话</label>
                        <input class='form-control' name='mobile' data-type='text' />
                    </div>
                                        </div>

                                        <div class='row'>
                                                
                    <div class='col-md-12'>
                        <label>地址</label>
                        <textarea class='form-control' name='address' data-type='text'></textarea>
                    </div>
                                                
                    <div class='col-md-12'>
                        <label>备注</label>
                        <textarea class='form-control' name='remark' data-type='text'></textarea>
                    </div>
                                        </div>

                                        <div class='row'>
                                                
                    <div class='col-md-6' style="display:none;">
                        <label>公司</label>
                        <input class='form-control' name='companyid' data-type='text' />
                    </div>
                                                
                                        </div>
        </form>
        <div style="margin-top:1em;">
            <button class="btn btn-primary" onclick="base_companyinfo_editFrm.ok();">确定</button>
            <button class="btn btn-default" onclick="base_companyinfo_init.back()">取消</button>
        </div>
    </div>
    <script>
        var base_companyinfo_edit;

        var base_companyinfo_editFrm = {
            ok: function () {
                //base_companyinfo_edit.refObj()
                //console.log(JSON.stringify(base_companyinfo_edit.refObj()));
                if (base_companyinfo_init.getObj_edit() == null) {
                    var obj = base_companyinfo_edit.refObj();
obj.companyid = base_company_init.getId_detail_edit();
                    $.post('/api/base_companyinfo/add', obj, function () {
                        window.location.reload();
                    });
                } else {
                    $.post('/api/base_companyinfo/edit', base_companyinfo_edit.refObj(), function () {
                        window.location.reload();
                    });
                }
            }
        }

        $(function () {
            base_companyinfo_edit = cusEdit();
            base_companyinfo_edit.init({
                data: base_companyinfo.data,
                editObj: base_companyinfo_init.getObj_edit()
                    });
            base_companyinfo_edit.initEdit();
        })
    </script>
</body>
</html>
